<script setup lang="ts">
import { inject } from 'vue'

const count = inject('count');
const updateCount = inject<(num: number) => void>('updateCount');
</script>

<template>
  <div class="child-page" style="padding: 50px; border: 10px solid #ccc">
    child 组件 {{ count }} 
    <button @click="updateCount!(100)">修改count</button>
  </div>
</template>